package com.ch01.ex25;


/**
 * Created by zc on 2016/1/27.
 */
public class TaskMain {

    public static void main(String[] args){
        NumberObj numberObj = new NumberObj();

        Task1 task1 = new Task1(numberObj);
        Task2 task2 = new Task2(numberObj);

        Thread thread1 = new Thread(task1);
        Thread thread2 = new Thread(task2);

        thread1.start();
        thread2.start();

        try {
            thread1.join();
            thread2.join();
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
}
